Skip to content

Comments

Moodle workplace release page#1527

Open
lostrogit wants to merge 1 commit intomoodle:mainfrom
lostrogit:workplace_release_docs
Open

Moodle workplace release page#1527
lostrogit wants to merge 1 commit intomoodle:mainfrom
lostrogit:workplace_release_docs

Conversation

@lostrogit
Copy link

Create a dedicated release documentation page for Moodle Workplace (similar to LMS and Mobile) based on https://docs.moodle.org/dev/Moodle_Workplace_releases, and provide a CLI tool to simplify adding new major or minor Workplace versions, including its specific requirements (rolling versions).

Copilot AI review requested due to automatic review settings February 24, 2026 09:33
@lostrogit lostrogit requested a review from a team as a code owner February 24, 2026 09:33
@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9d7d9c8
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/699d7055a9aeb00008e6a7b7
😎 Deploy Preview https://deploy-preview-1527--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR creates a comprehensive release documentation system for Moodle Workplace, following the established pattern used for LMS and Mobile releases. It includes JSON schema definitions, TypeScript utilities for release management, React components for displaying release information, a CLI tool for managing version data, and a markdown documentation page.

Changes:

  • Added JSON schema and data structures for Moodle Workplace version tracking with support for rolling releases
  • Created TypeScript utilities and React components to display Workplace release information
  • Implemented CLI tool to simplify adding new major/minor Workplace versions
  • Created dedicated Workplace releases documentation page with comprehensive release history

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
static/schema/wp_versions.json JSON schema defining the structure for Workplace version data, including rolling release support
data/wp_versions.json Complete version data for all Moodle Workplace releases from 3.7 to 5.1
src/utils/SupportedReleasesWP.ts TypeScript utility functions for managing and querying Workplace release data
src/components/SupportedReleasesWP/index.tsx React component displaying currently supported Workplace releases in a table
src/components/SupportedReleasesWP/styles.module.css CSS styling for Workplace release components
src/components/ReleaseTableWP/index.tsx React component displaying detailed release information for a specific Workplace version
scripts/wp_version.mjs CLI tool for adding new major/minor versions and managing release data
general/wp_releases.md Documentation page with release cycle information and comprehensive version history
sidebars/general.js Added sidebar entry for Workplace Releases documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

extendedSecurityEndDate?: string,
isLTS: boolean,
isRolling: boolean,
isExperimental: boolean,
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TypeScript interface defines isExperimental as a required boolean field, but this property is not present anywhere in the data file. This will cause TypeScript compilation errors or runtime issues. Either add isExperimental: false to all version entries in the data, or make the field optional in the interface by changing isExperimental: boolean, to isExperimental?: boolean,.

Suggested change
isExperimental: boolean,
isExperimental?: boolean,

Copilot uses AI. Check for mistakes.
},
{
"name": "4.1.2",
"releaseDate": "14 March 2001",
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release date "14 March 2001" appears to be incorrect. Based on the surrounding releases (4.1.1 was "17 January 2023" and 4.1.3 was "25 April 2023"), this should be "14 March 2023". The version number 2023011120 also confirms this should be in 2023.

Suggested change
"releaseDate": "14 March 2001",
"releaseDate": "14 March 2023",

Copilot uses AI. Check for mistakes.
Comment on lines +146 to +150
## Moodle workplace 3.8
<ReleaseTableWP releaseName="3.8"/>

<br />
## Moodle workplace 3.7
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"workplace" should be capitalized as "Workplace" to be consistent with all other headings in the document.

Suggested change
## Moodle workplace 3.8
<ReleaseTableWP releaseName="3.8"/>
<br />
## Moodle workplace 3.7
## Moodle Workplace 3.8
<ReleaseTableWP releaseName="3.8"/>
<br />
## Moodle Workplace 3.7

Copilot uses AI. Check for mistakes.
Comment on lines +163 to +173
export const getRelease = (versionName: string): versionInfo | null => {
const [major, release] = versionName.split('.');
const majorVersionName = `${major}.${release}`;
const majorVersion = getAllVersions().find((version) => version.name === majorVersionName);

if (!majorVersion) {
return null;
}

return majorVersion.releases.find((versionInfo) => versionInfo.name === versionName);
};
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The getRelease function doesn't consider the isRolling property when finding a release. Since the data contains both rolling and non-rolling versions with the same major version name (e.g., "5.1"), this function could return releases from the wrong version type. The function should either accept an isRolling parameter or document that it returns the first match found, which may be ambiguous.

Copilot uses AI. Check for mistakes.
updateMajorVersionWithData(majorVersionName, thisVersionData, isRollingVersion);
await persistVersionData();

addMinorRelease(!versionList.length, releaseDate, versionList);
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recursive call to addMinorRelease is missing the await keyword. Since addMinorRelease is an async function, this call should be awaited to ensure proper execution order and error handling.

Suggested change
addMinorRelease(!versionList.length, releaseDate, versionList);
await addMinorRelease(!versionList.length, releaseDate, versionList);

Copilot uses AI. Check for mistakes.
},
{
"name": "4.1.9",
"releaseDate": "13 February 2023",
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release date "13 February 2023" appears to be incorrect. This release (4.1.9) comes after 4.1.8 which was released on "23 December 2023", so this should be "13 February 2024" instead. The chronological order of releases is inconsistent here.

Suggested change
"releaseDate": "13 February 2023",
"releaseDate": "13 February 2024",

Copilot uses AI. Check for mistakes.
const releaseData = versionData?.releases.find((release) => release.name === releaseName);
if (!releaseData) {
// If there is a releaseName for a minor release, but no release data for it,
// then it has not yet been added and is a future relesae.
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "relesae" should be "release".

Suggested change
// then it has not yet been added and is a future relesae.
// then it has not yet been added and is a future release.

Copilot uses AI. Check for mistakes.
Comment on lines +146 to +150
## Moodle workplace 3.8
<ReleaseTableWP releaseName="3.8"/>

<br />
## Moodle workplace 3.7
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"workplace" should be capitalized as "Workplace" to be consistent with all other headings in the document.

Suggested change
## Moodle workplace 3.8
<ReleaseTableWP releaseName="3.8"/>
<br />
## Moodle workplace 3.7
## Moodle Workplace 3.8
<ReleaseTableWP releaseName="3.8"/>
<br />
## Moodle Workplace 3.7

Copilot uses AI. Check for mistakes.
hidden?: boolean,
codeFreezeDate?: string,
releaseDate: string,
improvementsandnewfeaturesEndDate: string,
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TypeScript interface defines improvementsandnewfeaturesEndDate as a required string field, but the data contains empty strings for this field (e.g., lines 39, 117, 219). Consider making this field optional in the interface by changing improvementsandnewfeaturesEndDate: string, to improvementsandnewfeaturesEndDate?: string, or ensuring all non-rolling versions have a meaningful value instead of empty strings.

Suggested change
improvementsandnewfeaturesEndDate: string,
improvementsandnewfeaturesEndDate?: string,

Copilot uses AI. Check for mistakes.

versionData.versions.unshift(schema);

addReleaseMarkdown(name, isRolling, isLTS);
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to addReleaseMarkdown is missing the await keyword. Since addReleaseMarkdown is an async function that performs file I/O, this call should be awaited to ensure the markdown file is updated before proceeding.

Suggested change
addReleaseMarkdown(name, isRolling, isLTS);
await addReleaseMarkdown(name, isRolling, isLTS);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant